package thread;

public class CurrentThreadDemo {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
        System.out.println(main);
        doSome();
        Thread t = new Thread(){
            public void run(){
                Thread t = Thread.currentThread();
                System.out.println("线程t："+t);
                doSome();
            }
        };
        t.start();

    }

    public static void doSome(){
        Thread t = Thread.currentThread();
        System.out.println("执行doSome方法的线程是："+t);
    }
}
